package com.koron.tool.frame;

import java.awt.event.ActionEvent;
import java.awt.event.InputEvent;
import java.awt.event.KeyEvent;
import java.beans.PropertyVetoException;

import javax.swing.AbstractAction;
import javax.swing.KeyStroke;

import com.koron.tool.MainFrame;

public class ProjectPropertiesAction extends AbstractAction{
	MainFrame parent;
	public ProjectPropertiesAction(MainFrame parent)
	{
		putValue(NAME, "项目属性");
		putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_P,InputEvent.CTRL_MASK+InputEvent.ALT_MASK));
		this.parent = parent;
	}
	@Override
	public void actionPerformed(ActionEvent e) {
		ProjectPropertiesFrame frame = new ProjectPropertiesFrame();
		parent.getDesktop().add(frame);
		try {
			frame.setSelected(true);
		} catch (PropertyVetoException e1) {
			
		}
		
	}
}
